package com.slkj.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class RequestResponseBox {

    public static ThreadLocal<HttpServletRequest> requestLocal = new ThreadLocal<HttpServletRequest>();
    public static ThreadLocal<HttpServletResponse> responseLocal = new ThreadLocal<HttpServletResponse>();


    public static void setRequest(HttpServletRequest request) {
        requestLocal.set(request);
    }

    public static HttpServletRequest getRequest() {
        return requestLocal.get();
    }

    public static void setResponse(HttpServletResponse response) {
        responseLocal.set(response);
    }

    public static HttpServletResponse getResponse() {
        return responseLocal.get();
    }


}
